import logging

from pylons import request, response, session, tmpl_context as c
from pylons.controllers.util import abort, redirect_to

from horseanalysis.lib.base import BaseController, render
from datetime import date, datetime
from horseanalysis.model.race import Race

log = logging.getLogger(__name__)

class ApplicationController(BaseController):
  def __init__(self):
    super( BaseController, self ).__init__()
    c.current_datetime = datetime.now().strftime("%d-%m-%Y %H:%M:%S")
    c.current_races = Race.get_current_race_day_races()
    c.current_race = Race.get_current_race()